package com.djq.project.mq.consumer.publisherConfirms;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class PublisherConfirmsConfig {

    public final static String  DIRECT_EXCHANGE="publisherConfirms_exchange";
    public final static String  DIRECT_EXCHANGE_QUEUE="publisherConfirmsQueue";

    //创建一个direct交换机
    @Bean
    DirectExchange directExchange() {
        return new DirectExchange(DIRECT_EXCHANGE);
    }

    @Bean
    public Queue publisherConfirmsQueue() {
        return new Queue(DIRECT_EXCHANGE, true);
    }
}
